package com.loooooo.pm2024.modules.secu;

import javax.servlet.http.HttpSession;

public class SessionCache {

    private static ThreadLocal<HttpSession> threadLocal = new ThreadLocal<>();

    public static <T extends HttpSession> void put(T t) {
        threadLocal.set(t);
    }

    @SuppressWarnings("unchecked")
    public static <T> T get() {
        return (T) threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }

}